import java.util.Arrays;
import java.util.Locale;

public class Test {
    public static void main(String[] args) {
        String s = "   he  he  he   ";
        String ret = s.trim();
        System.out.println("["+s+"]");
        System.out.println("["+ret+"]");
    }
    public static void main9(String[] args) {
        String s = "2 4 5 6 7";
        String[] resut = s.split(" ",5);
        for (String a:resut) {
            System.out.println(a);
        }
    }
    public static void main8(String[] args) {
        String s = "ahakakahah";
//        String ret = s.replace('a','k');
        String ret = s.replaceFirst("ka","cc");
        System.out.println(ret);

    }
    public static void main7(String[] args) {
        String s = String.format("%d--%d",22,33);
        System.out.println(s);
    }
    public static void main6(String[] args) {
        String str1 = "hello";
        String str = "HEhE";
        String str3 = str.toLowerCase();
        String str2 = str1.toUpperCase();
        System.out.println(str1);
        System.out.println(str2);
        System.out.println(str3);
    }
    public static void main5(String[] args) {
        String str1 = String.valueOf(12);
        str1 += 1;
        System.out.println(str1);//121
        int date = Integer.parseInt("12");
        date = date + 1;
        System.out.println(date);//13
    }
    public static void main4(String[] args) {
        String str1 = "absbdshdhs";
        int index = str1.indexOf('h');
        int index2 = str1.lastIndexOf('b');
        System.out.println(index);
        System.out.println(index2);
    }
    public static void main3(String[] args) {
        String str1 = new String("abc");
        String str2 = new String("abcd");
        System.out.println(str1.compareTo(str2));

    }
    public static void main2(String[] args) {
        String str1 = new String("abc");
        String str2 = new String("abc");
        System.out.println(str1 == str2);
    }
    public static void main1(String[] args) {
        String str1 = "abc";
        String str2 = "abc";
        System.out.println(str1 == str2);
    }
}
